# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ethtool
pkgver=6.11
pkgrel=0
pkgdesc="Utility for controlling network drivers and hardware"
url="https://mirrors.edge.kernel.org/pub/software/network/ethtool/"
arch="all"
license="GPL-2.0-only"
makedepends="linux-headers libmnl-dev"
subpackages="$pkgname-doc $pkgname-bash-completion"
source="https://www.kernel.org/pub/software/network/ethtool/ethtool-$pkgver.tar.xz"

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
77f649e1082a164e3627bcb21db1215a89d9a0e984f86516bb05879685aee76b034f6a9e19a499dcdd82883fa003f628b70d27ca8272064df27fe9de67c7a9a7  ethtool-6.11.tar.xz
"
